/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.oea.hibernate.entities;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.Transient;

/**
 *
 * @author unnati
 */
@Table(name = "exams")
@Entity
public class Exam extends AbstractEntity
{
    @GeneratedValue
    
    @Column(name = "id")
    @Id
  protected  Long id;
    
    @Column(name="name")
     protected String name;
    
    @Column(name="sdate")
     protected  String sdate;
    
    @Column(name="edate")
     protected String edate;
    
    @Column(name="semester")
     protected Long semester;

    @Column(name = "addedby")
    protected Long addedby;
    
    @Column(name = "bid")
    protected Long bid;
    
    @Transient
    protected  Faculty faculty;
    
    @Transient
    protected Branch branch;

    public Long getBid() {
        return bid;
    }

    public void setBid(Long bid) {
        this.bid = bid;
    }

    public Faculty getFaculty() {
        return faculty;
    }

    public void setFaculty() {
        this.faculty = (Faculty) new Faculty().getById(addedby);
    }

   

    public Branch getBranch() {
        return branch;
    }

    public void setBranch( ) {
        this.branch = (Branch) new Branch().getById(bid);
    }
    
    

    public Long getAddedby() {
        return addedby;
    }

    public void setAddedby(Long addedby) {
        this.addedby = addedby;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSdate() {
        return sdate;
    }

    public void setSdate(String sdate) {
        this.sdate = sdate;
    }

    public String getEdate() {
        return edate;
    }

    public void setEdate(String edate) {
        this.edate = edate;
    }

    public Long getSemester() {
        return semester;
    }

    public void setSemester(Long semester) {
        this.semester = semester;
    }

    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    
}
